package com.powersystem.demo.controller;


import com.powersystem.demo.entity.PsSolverDetail;
import com.powersystem.demo.mapper.PsSolverDetailMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author linrongji
 * @since 2019-11-14
 */
@RestController
@RequestMapping("/powersystem.demo/psSolverDetail")
public class PsSolverDetailController {
    @Autowired
    private PsSolverDetailMapper psSolverDetailMapper;

    @RequestMapping("addPsSolverDetail")
    public int addPsSolverDetail(PsSolverDetail pfr){
        return psSolverDetailMapper.insert(pfr);
    }

    @RequestMapping("delePsSolverDetail")
    public int delePsSolverDetail(int id){

        return psSolverDetailMapper.deleteById(id);
    }
    @RequestMapping("upPsSolverDetail")
    public int upPsSolverDetail(PsSolverDetail pfr){
        return psSolverDetailMapper.updateById(pfr);
    }

    @RequestMapping("PsSolverDetailById")
    public PsSolverDetail PsSolverDetailById(int id) {

        return psSolverDetailMapper.selectById(id);
    }
}

